Add outbound websocket client connections for central_hub#124
Merged
Add outbound websocket client connections for central_hub#124
Conversation
this is to facilitate central_hub ability to read the outbound_connections from the basic_bot.yml file
- Created outbound_clients.py class to manage websocket connections that central_hub initiates (vs
accepting inbound)
- Extended config schema to support outbound_clients array with name, uri, identity, and
shared_token_file fields
- Changed from inline shared_token to shared_token_file (pointing to file) for better security
- Added tokens/ directory to .gitignore for storing authentication tokens
- Added example outbound client configuration in basic_bot.yml
- Includes auto-reconnection logic (5 second retry on failure)
…ication - Implemented OutboundClients class with connection management: - Auto-reconnection on disconnect (5 second retry) - Send identity with optional shared token authentication - Forward all message types to central_hub for processing - Broadcast state updates to all connected outbound clients - Refactored central_hub message handling: - Split handle_message into handle_message (process single message) and handle_connect (connection lifecycle) - Extracted message processing logic to be reusable for both inbound and outbound connections - Added outbound client support to send_state_update_to_subscribers for bidirectional sync - Enables full bidirectional communication: - Local state updates forwarded to remote servers - Remote state updates forwarded to local hub - Both inbound and outbound connections use same message processing logic 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Completes OutboundClients class implementation with auto-reconnection - Adds BB_CONFIG_FILE constant to centralize config path - Removes unnecessary iseeu message handler - Renames MockRemoteHub to MockOutboundClient for clarity - Adds comprehensive integration tests for bidirectional hub communication - Tests verify: connection/identity, local-to-remote, remote-to-local, and bidirectional state sync 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
littlebee
commented
Oct 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
updateStatemessages to remote hubsChanges
OutboundClientsclass implementation incommons/outbound_clients.pyBB_CONFIG_FILEconstant to centralize configuration pathiseeumessage handler from central_hubMockRemoteHub→MockOutboundClientfor naming clarityTest plan
🤖 Generated with Claude Code